<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">
<p:outputPanel id="panel_dictionary" layout="block" rendered="#{not empty dictionaryBean.lazyModel}">

	<p:dataTable id="dictionaryTable" var="dictionary" value="#{dictionaryBean.lazyModel}" rows="20" paginator="true" lazy="true" style="margin-bottom:0"
	paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,50"
	selectionMode="single" selection="#{dictionaryForm.selectedDictionary}">

		<p:column selectionMode="multiple" style = "width:16px;text-align:center" />

	    <p:column headerText="id" sortBy="id" style="width:30px;text-align:center">
	        <h:outputText value="#{dictionary.id}" />
	    </p:column>

	    <p:column headerText="type" sortBy="type">
	        <h:outputText value="#{dictionary.type}" />
	    </p:column>

	    <p:column headerText="name" sortBy="name">
	        <h:outputText value="#{dictionary.name}" />
	    </p:column>

	    <p:column headerText="rgtOpt" sortBy="rgt_opt" style="width:80px;">
	        <h:outputText value="#{dictionary.rgtOpt}" />
	    </p:column>

	    <p:column headerText="updOpt " sortBy="upd_opt" style="width:80px;">
	        <h:outputText value="#{dictionary.updOpt}" />
	    </p:column>

	    <p:column headerText="rgtDate" sortBy="rgt_date" style="width:150px;">
	        <h:outputText value="#{dictionary.rgtDate}" />
	    </p:column>

	    <p:column headerText="updDate " sortBy="upd_date" style="width:150px;">
	        <h:outputText value="#{dictionary.updDate}" />
	    </p:column>

	    <p:column style="width:32px;text-align: center">
	        <p:commandButton title="更新" icon="ui-icon-search" id="btn_dictionary_update" actionListener="#{dictionaryBean.viewUpdateDictionary(dictionary)}" ajax="true">
				<p:ajax event="dialogReturn" listener="#{dictionaryBean.updateDictionaryResult}" update="dictionaryTable" />
			</p:commandButton>
	    </p:column>

	</p:dataTable>
</p:outputPanel>
</ui:composition>